import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Tx from "../views/Tx.vue"
import Block from "../components/Block.vue"
import Blocks from "../components/Blocks.vue"
import Transaction from "../components/Transaction.vue"
import Transactions from "../components/Transactions.vue"
import Contracts from "../components/Contracts.vue"
import Balance from "../components/Balance.vue"
import Login from "../components/Login.vue"
import Accounts from "../components/Accounts"
import UserInfos from "../components/UserInfos"
import UserInfo from "../components/UserInfo"
import Wallet from "../components/Wallet"
import Dashborad from "../components/Dashborad"

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/block',
    name: 'Block',
    component: Block
  },
  {
    path: '/blocks',
    name: 'Blocks',
    component: Blocks
  },
  {
    path: '/transaction',
    name: 'Transaction',
    component: Transaction
  },
  {
    path: '/transactions',
    name: 'Transactions',
    component: Transactions
  },
  {
    path: "/contracts",
    name: "Contracts",
    component: Contracts,
  },
  {
    path: "/balance",
    name: "Balance",
    component: Balance,
  },
  {
    path: "/wallet",
    name: "Wallet",
    component: Wallet,
  },
  {
    path: "/dashborad",
    name: "Dashborad",
    component: Dashborad,
  },
  {
    path: "/login",
    name: "Login",
    component: Login,
  },
  {
    path: "/accounts",
    name: "Accounts",
    component: Accounts
  },
  {
    path: "/userinfos",
    name: "UserInfos",
    component: UserInfos
  },
  {
    path: "/userinfo",
    name: "UserInfo",
    component: UserInfo
  },
  {
    path: '/tx',
    name: 'Tx',
    component: Tx
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
